/*
 * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @Date: 2024-12-09 20:49:51
 * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @LastEditTime: 2025-02-19 14:58:01
 * @FilePath: /vue-element-admin/src/api/warehousing.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'

/**
 * @description 库存管理 出如库管理 
 * @param {Number} param id {Number} 当前明细id type {string} 作废/恢复
 */
export function invalidRecoverApi(id) {
  return request({
    url: `/retailStockTrade/invalidRecover?id=${id}`,
    method: 'put',
    // data
  })
}



/**
 * @description 库存管理 出库管理 出库详情
 * @param {Number} param type {String} 出库/入库
 */
export function outofstockDetailListApi(data) {
  return request({
    url: '/retailStockTrade/listQuery',
    method: 'get',
    params: data,
  });
}



/**
 * @description 库存管理 出库管理 出库按钮 
 * @param {Number} param type {String} 出库/入库
 */
export function outofstockApi(data) {
  return request({
    url: '/retailStockTrade/add',
    method: 'post',
    data
  });
}



/**
 * @description 库存管理 物料配置 获取列表
 * @param {Number} param type {String} 出库/入库
 */
export function getMaterialListQuery(data) {
  return request({
    url: '/retailStock/list',
    method: 'get',
    params: data,
  });
}

export function getListQuery(query) {
  return request({
    url: 'retailStock/listQuery',
    // url: 'retailStockTrade/listQuery',

    method: 'get',
    params: query


  })
}


export function getList(query) {
  return request({
    url: '/retailStockTrade/list',
    method: 'get',
    params: query


  })
}

export function create(data) {
  return request({
    url: '/retailStockTrade/add',
    method: 'post',
    data
  })
}

export function update( data) {
  return request({
    url: `/retailStockTrade/update`,
    method: 'put',
    data
  })
}

export function deleteData(id) {
  return request({
    url: `/retailStockTrade/delete/?id=${id}`,
    method: 'delete'
  })
}
